PUT an update to an Annotation

Making an update to an Annotation is as simple as POSTing JSON to the id of the annotation, containing the changed annotation.

However, you must provide the ETag using the If-Match header.

For example if we did a GET.

GET RESPONSE

HTTP/1.1 200
ETag: W/“741c3b063c0345ce862a62cf429b2a4b” \<\<\<\< ETag HERE
Link: \<http://www.w3.org/ns/ldp\#Resource\>; rel="type"
Allow: PUT,GET,OPTIONS,HEAD,DELETE
Vary: Accept
Memento-Datetime: Sun, 20 May 2018 19:37:32 UTC \#\# IGNORE THIS FOR NOW
Content-Type: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld";charset=UTF-8
Transfer-Encoding: chunked
Date: Sun, 20 May 2018 19:56:18 GMT
Connection: close
{
"@context" : "http://www.w3.org/ns/anno.jsonld",
"id" : "http://localhost:8080/annotation/w3c/my-container/foo-bar",
"type" : "Annotation",
"body" : {
"type" : "TextualBody",
"value" : "This one has a SLUG, so I know what id the annotation will have."
},
"target" : "http://www.example.com/index.html"
}

A PUT to update that annotation would look like

PUT

PUT /annotationw3c/my-container/ HTTP/1.1
Accept: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"
Content-Type: application/ld+json;
If-Match: 741c3b063c0345ce862a62cf429b2a4b
Host: localhost:8080
Connection: close
User-Agent: Paw/3.1.5 (Macintosh; OS X/10.13.4) GCDHTTPRequest
Content-Length: 281
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"type": "Annotation",
"body": {
"type": "TextualBody",
"value": "This one has a SLUG, so I know what id the annotation will have. And I have changed its content."
},
"target": "http://www.example.com/index.html"
}

RESPONSE

HTTP/1.1 200
ETag: W/"3b6f03d78812a166ce6b43e415b58e29"
Link: \<http://www.w3.org/ns/ldp\#Resource\>; rel="type"
Link: \<http://localhost:8080/annotation/w3c/services/history/my-container/foo-bar/1\>; rel="prev memento"; datetime="Sun, 20 May 2018 19:37:32 UTC"
Allow: PUT,GET,OPTIONS,HEAD,DELETE
Vary: Accept
Memento-Datetime: Sun, 20 May 2018 20:01:04 UTC
Content-Type: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld";charset=UTF-8
Transfer-Encoding: chunked
Date: Sun, 20 May 2018 20:01:05 GMT
Connection: close
{
"@context" : "http://www.w3.org/ns/anno.jsonld",
"id" : "http://localhost:8080/annotation/w3c/my-container/foo-bar",
"type" : "Annotation",
"body" : {
"type" : "TextualBody",
"value" : "This one has a SLUG, so I know what id the annotation will have. And I have changed its content."
},
"target" : "http://www.example.com/index.html"
}